export interface CategoryItem {
  col: number;
  name: string;
  id: string;
  urlname: string;
}

export interface CategoryResponse {
  categorys: CategoryItem[]
}

export interface PexelsQuery {
  page: number;
  size: number;
  categoryId: string;
  searchText?: string;
}


export interface PexelsItem {
  author: string;
  avatar: string;
  id: string;
  photo: string;
  photoHeight: number;
  photoWidth: number
  title: string
  tags: string[]
}

export interface PexelsListResponse {
  list: PexelsItem[];
  page: string;
  size: string;
  total: number
}

export interface getPexelsHintResponse {
  result: string[];
  total: number;
}

/**
 * 为每个分类定义一个缓存状态的结构
 * 这里包含了该分类所需的所有状态
 */
export interface CategoryCache {
  list: PexelsItem[];
  total: number;
  page: number;
  scrollTop: number; // 用于记录该分类的滚动位置
  isFinished: boolean;
}

export interface LoginParams {
  loginType: string ;
  password: string ;
  username: string ;
}

export interface RegisterParams {
  password: string ;
  username: string ;
}

export interface LoginResponse {
  token:string
}

export interface ProfileResponse {
  avatar:string;
  _id:string;
  username:string;
  nickName:string;
  wxOpenId:string ; 
  qqOpenId:string;

}